package com.dudu.enumeration;

import org.apache.commons.lang.StringUtils;

/**
 * 能力平台提供能力类型
 * 
 *
 */
public enum AbilityTypeEnum {
	
	
	MPTY("MPTY", "多方通话"),
		TALKSV2("TalksV2", "多方通话"),
		SCONFERENCE("ScheduleConference", "专业会议 "),
		ECPMEET("EcpMeet", "ECP多方通话"),
	
	DIAL("DIAL", "点击拨号"),
		DIAL_IMS("Dial", "IMS点击拨号"),
		DIAL_ECP("Dial_ecp", "ECP点击拨号"),
		DiAl_RONGLIAN("Dial_ronglian","荣联点击拨号"),
		DIAL_TIANYI("Dial_tianyi","天亿点击拨号"),
		DIAL_CHENGQI("Dial_chengqi","承启通点击拨号"),
		DIAL_YONYOU("Dial_YonYou","自建通道点击拨号"),
	SMMS("SMMS", "短信"),
		SMS_BAIWU("BaiWuSMS","百悟普通短信"),
		SMS_MC("MCSMS","名传普通短信"),
		SMS_WW("WWSMS","微网普通短信"),
		SMS_WWJSD("WWJSDSMS","微网极速达短信"),
	ADSMMS("ADSMMS", "营销短信"),
		MCADSMS("MCADSMS","名传营销短信"),
		WWADSMS("WWADSMS","微网营销短信"),
	VOICE("VOICE", "语音通知"),
		VOICENOTICE3("VoiceNotice3", "IMS文字语音通知"),
		RONGLIANVOICE("RongLianVoice","容联文字语音通知"),
		TIANYIVOICE("TianYiVoice","天亿文字语音通知"),
		TIANRUNVOICE("TianRunVoice", "天润文字语音通知"),
		YONYOUVOICE("YonYouVoice","用友自建文字语音通知"),
	AUDEO("AUDEO", "语音留言"),
		AUDEOSEND("AudeoSend", "IMS录音语音通知"),
		RONGLIANAUDEO("RongLianAudeo","容联录音语音通知"),
		TIANYIAUDEO("TianYiAudeo","天亿录音语音通知"),
		YONYOUAUDEO("YonYouAudeo","用友自建录音语音通知"),
	VOICE70("VOICE70", "70字文字语音通知"),
		TIANYIVOICE70("TianYiVoice70","天亿文字语音通知"),
		RONGLIANVOICE70("RongLianVoice70","荣联70字文字语音通知"),
		TIANRUNVOICE70("TianRunVoice70","天润70字文字语音通知"),
		YONYOUVOICE70("YonYouVoice70","用友自建70字文字语音通知"),
	VOICE140("VOICE140", "140字文字语音通知"),
		TIANYIVOICE140("TianYiVoice140","天亿文字语音通知"),
		RONGLIANVOICE140("RongLianVoice140","荣联140字文字语音通知"),
		TIANRUNVOICE140("TianRunVoice140","天润140字文字语音通知"),
		YONYOUVOICE140("YonYouVoice140","用友自建140字文字语音通知"),
	AUDEO70("AUDEO70", "70字录音语音通知"),
		TIANYIAUDEO70("TianYiAudeo70","天亿录音语音通知"),
		RONGLIANAUDEO70("RongLianAudeo70","荣联70字录音语音通知"),
		YONYOUAUDEO70("YonYouAudeo70","用友自建70字录音语音通知"),
	AUDEO140("AUDEO140", "140字录音语音通知"),
		TIANYIAUDEO140("TianYiAudeo140","天亿录音语音通知"),
		RONGLIANAUDEO140("RongLianAudeo140","荣联140字录音语音通知"),
		YONYOUAUDEO140("YonYouAudeo140","用友自建140字录音语音通知"),
	CALLRECORDER("CALLRECORDER", "录音"),
		CALLRECORDER_IMS("CallRecorder","IMS录音"),
	
	VCAPTCHA("VCAPTCHA", "语音验证码"),
		VCAPTCHA_IMS("Vcaptcha", "IMS语音验证码"),
		
	IVVR("IVVR", "IVR外呼"),
	    IVR_RONGL("Ivr_RongL", "荣联IVR"),
	    IVR_IMS("Ivr_Ims","IMSIVR"),
	    IVR_TianYi("Ivr_TianYi","天亿IVR"),
	    IVR_YONYOU("Ivr_YonYou","自建通道IVR");
	

	private String key;

	private String value;

	private AbilityTypeEnum(String key, String value) {
		this.key = key;
		this.value = value;
	}

	public String getKey() {
		return this.key;
	}

	public String getName() {
		return this.name();
	}

	public String getValue() {
		return this.value;
	}
	
	/**
	 * 根据name获取枚举对象
	 * @param name
	 * @return
	 */
	public static AbilityTypeEnum getAbilityTypeEnum(String key) {
		if(StringUtils.isBlank(key)){
			return null;
		}
		AbilityTypeEnum[] enumArray = AbilityTypeEnum.class.getEnumConstants();
		for (AbilityTypeEnum abilityTypeEnum : enumArray) {
			if (key.equals(abilityTypeEnum.getKey())) {
				return abilityTypeEnum;
			}
		}
		return null;
	}
	
	public static void main(String[] args) {
		
		System.out.println(AbilityTypeEnum.getAbilityTypeEnum("AudeoSend").getValue());
		/*List<ReportDailyAbilityBean> reportDailyBeanList = new ArrayList<ReportDailyAbilityBean>(10);
		
		ReportDailyAbilityBean bean = new ReportDailyAbilityBean();
		bean.setAbility_type("MPTY");
		reportDailyBeanList.add(bean);
		
		for(ReportDailyAbilityBean b:reportDailyBeanList){
			b.setAbility_type(AbilityTypeEnum.getAbilityTypeEnum(b.getAbility_type()).getValue());
		}
		
		System.out.println("success");*/
	}
}
